﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Resources;

namespace B10.Models
{
    public enum Categories
    {
        /// <summary>
        /// Sztuka i Literatura
        /// </summary>
        ArtsAndHumanities,
        /// <summary>
        /// Auto-Moto
        /// </summary>
        Automotive,
        /// <summary>
        /// Zdrowie i uroda
        /// </summary>
        BeautyAndHealth,
        /// <summary>
        /// Biznes
        /// </summary>
        Business,
        /// <summary>
        /// Społeczności internetowe
        /// </summary>
        Communities,
        /// <summary>
        /// Edukacja
        /// </summary>
        Education,
        /// <summary>
        /// Rozrywka
        /// </summary>
        Entertainment,
        /// <summary>
        /// Finanse i ubezpieczenia
        /// </summary>
        FinanceAndInsurance,
        /// <summary>
        /// Kulinaria
        /// </summary>
        FoodAndDrink,
        /// <summary>
        /// Gry
        /// </summary>
        Games,
        /// <summary>
        /// Dom i ogród
        /// </summary>
        HomeAndGarden,
        /// <summary>
        /// Praca i kariera
        /// </summary>
        JobsAndCareers,
        /// <summary>
        /// Mężczyźni
        /// </summary>
        MensInterest,
        /// <summary>
        /// Muzyka
        /// </summary>
        Music,
        /// <summary>
        /// Wiadomości i wydarzenia
        /// </summary>
        News,
        /// <summary>
        /// Nieruchomości
        /// </summary>
        RealEstate,
        /// <summary>
        /// Zakupy
        /// </summary>
        Shopping,
        /// <summary>
        /// Sport
        /// </summary>
        Sports,
        /// <summary>
        /// Technologia
        /// </summary>
        Technology,
        /// <summary>
        /// Turystyka i podróże
        /// </summary>
        Travel,
        /// <summary>
        /// Kobiety
        /// </summary>
        WomensInterests
    }

    public class CategoryHelper
    {
        public static IEnumerable<object> GetCategories()
        {
            List<object> result = new List<object>();
            foreach (Categories category in Enum.GetValues(typeof(Categories)))
            {
                result.Add(new
                {
                    Name = CategoryNames.ResourceManager.GetString(
                        Enum.GetName(typeof(Categories), category)),
                    Id = (int)category
                });
            }
            return result;
        }

        public static string GetCategoryName(Categories category)
        {
            return CategoryNames.ResourceManager.GetString(
                    Enum.GetName(typeof(Categories), category));
        }
    }
}
